home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- ### BEGIN INIT INFO
- # Provides: tails-reconfigure-memlockd
- # Required-Start: $local_fs
- # Required-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop:
- # X-Start-Before: memlockd
- # Short-Description: Reconfigure memlockd depending on running kernel
- # Description: Reconfigure memlockd depending on running kernel
- ### END INIT INFO
-
- PATH="/usr/local/bin:${PATH}"
- MEMLOCKD_CONF=/etc/memlockd.cfg
-
- case "$1" in
- start)
- tails-boot-to-kexec kernel $(tails-get-bootinfo kernel) \
- >> "$MEMLOCKD_CONF"
- tails-boot-to-kexec initrd $(tails-get-bootinfo initrd) \
- >> "$MEMLOCKD_CONF"
-
- # Tell sendsigs to forget about memlockd. Together with
- # not calling 'memlockd stop' on shutdown, we have a
- # strong chance that what tails-kexec needs will be available.
- mkdir -p /lib/init/rw/sendsigs.omit.d
- rm -f /lib/init/rw/sendsigs.omit.d/memlockd
- ln -s /var/run/memlockd.pid /lib/init/rw/sendsigs.omit.d/memlockd
- ;;
- *)
- echo "Usage: $0 start" >&2
- exit 3
- ;;
- esac
- exit 0
-